<template>
  <div class="container">
    <Header @success="onSuccess" />
    <Content />
  </div>
</template>

<script setup lang="ts">
import Header from "./components/Header.vue";
import Content from "./components/Content.vue";
import { IJsonData } from "@/types/question";
import piniaStore from "@/store";
import { onMounted } from "vue";

const onSuccess = (value: IJsonData) => {
  piniaStore.questionStore.setJson(value);
};

onMounted(() => {
  piniaStore.questionStore.getDbData()
})
</script>

<style scoped lang="scss">
// .container {
//   display: flex;
//   flex-direction: column;
// }
</style>
